package com.sbr.seb.wicket.page;

import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Homepage
 */
public class AddServerPage extends BasePage {

	private static final long serialVersionUID = 1L;
	protected static final Logger logger = LoggerFactory.getLogger(AddServerPage.class);

	public AddServerPage() {
		super();

		final TextField<Object> serverNameText = new RequiredTextField("serverName", new Model());
		final TextField<Object> serverTypeText = new RequiredTextField("serverType", new Model());
		final TextField<Object> serverHostText = new RequiredTextField("serverHost", new Model());
		final TextField<Object> serverPortText = new RequiredTextField("serverPort", new Model());
		final TextField<Object> serverLoginText = new RequiredTextField("serverLogin", new Model());
		final TextField<Object> serverPasswordText = new RequiredTextField("serverPassword", new Model());


		Form form = new Form("addServerForm") {

			@Override
			protected void onSubmit() {
				logger.debug("onSubmit called");
			}
		};
		form.add(serverNameText);
		form.add(serverTypeText);
		form.add(serverHostText);
		form.add(serverPortText);
		form.add(serverLoginText);
		form.add(serverPasswordText);
		
		add(form);
		add(new FeedbackPanel("feedbackPanel"));
	}

}
